<%-- 
    Document   : index
    Created on : 23/05/2012, 11:10:58
    Author     : luiz.perez
--%>

<%@page import="java.sql.ResultSet"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="style.css" />
        <script type="text/javascript" src="cadastroTurma.js"></script>
        <title>JSP Page</title>
    </head>
    <body>
        <h1>CADASTRO DE TURMA!</h1>
        <form id="divTurma" name="FormCadastroTurma" action="cadastroTurma2.jsp" method="post">
            <jsp:useBean id="pegaCursos" scope="page" class="org.neg.curso.Curso" />
            Curso:<br><select name="idCurso">
                <%
                    ResultSet rstCursos = pegaCursos.getCursos();
                    while(rstCursos.next())
                        out.write("<option value=\""+rstCursos.getString("IdCurso") +"\">"+rstCursos.getString("Nome") +"</option>\n");
                %>
            </select>
            <input type="submit" value="OK" />
            <br>Campos com asterisco(*) são obrigatórios.
        </form>
    </body>
</html>